CColor Struct Reference
RGBA Color structure.
More...
List of all members.
Public Member Functions |
| CColor (uint8_t red=255, uint8_t green=255, uint8_t blue=255, uint8_t alpha=255) |
| CColor (const CColor &inColor) |
|
|
CColor & | operator() (uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha) |
CColor & | operator= (const CColor &newColor) |
CColor | operator~ () |
bool | operator!= (const CColor &other) const |
bool | operator== (const CColor &other) const |
|
|
void | toHSV (double &hue, double &saturation, double &value) const |
| convert to hue, saturation and value
|
void | fromHSV (double hue, double saturation, double value) |
| convert from hue, saturation and value
|
void | toHSL (double &hue, double &saturation, double &lightness) const |
| convert to hue, saturation and lightness
|
void | fromHSL (double hue, double saturation, double lightness) |
| convert from hue, saturation and lightness
|
uint8_t | getLuma () const |
uint8_t | getLightness () const |
Public Attributes |
uint8_t | red |
| red component [0..255]
|
uint8_t | green |
| green component [0..255]
|
uint8_t | blue |
| blue component [0..255]
|
uint8_t | alpha |
| alpha component [0..255]
|
Detailed Description
RGBA Color structure.
Constructor & Destructor Documentation
CColor |
( |
uint8_t |
red = 255 , |
|
|
uint8_t |
green = 255 , |
|
|
uint8_t |
blue = 255 , |
|
|
uint8_t |
alpha = 255 | |
|
) |
| | [inline] |
Member Function Documentation
void fromHSL |
( |
double |
hue, |
|
|
double |
saturation, |
|
|
double |
lightness | |
|
) |
| | |
convert from hue, saturation and lightness
- Parameters:
-
| hue | in degree [0..360] |
| saturation | normalized [0..1] |
| lightness | normalized [0..1] |
void fromHSV |
( |
double |
hue, |
|
|
double |
saturation, |
|
|
double |
value | |
|
) |
| | |
convert from hue, saturation and value
- Parameters:
-
| hue | in degree [0..360] |
| saturation | normalized [0..1] |
| value | normalized [0..1] |
uint8_t getLightness |
( |
|
) |
const |
get the lightness of the color
uint8_t getLuma |
( |
|
) |
const [inline] |
get the luma of the color
bool operator!= |
( |
const CColor & |
other |
) |
const [inline] |
CColor& operator() |
( |
uint8_t |
red, |
|
|
uint8_t |
green, |
|
|
uint8_t |
blue, |
|
|
uint8_t |
alpha | |
|
) |
| | [inline] |
bool operator== |
( |
const CColor & |
other |
) |
const [inline] |
void toHSL |
( |
double & |
hue, |
|
|
double & |
saturation, |
|
|
double & |
lightness | |
|
) |
| | const |
convert to hue, saturation and lightness
- Parameters:
-
| hue | in degree [0..360] |
| saturation | normalized [0..1] |
| lightness | normalized [0..1] |
void toHSV |
( |
double & |
hue, |
|
|
double & |
saturation, |
|
|
double & |
value | |
|
) |
| | const |
convert to hue, saturation and value
- Parameters:
-
| hue | in degree [0..360] |
| saturation | normalized [0..1] |
| value | normalized [0..1] |
Member Data Documentation
The documentation for this struct was generated from the following files: